#ifndef TYPE_CONVERSION_H
#define TYPE_CONVERSION_H

#include <sstream>


template<typename T> class type_conversion 
{
  public:

    static T const to_number(std::string const& q);

};

template<typename T> T const type_conversion<T>::to_number(std::string const& q)
{
	std::stringstream s;
	T d(0);
	
	if(q.length())
	{
		s << q;

		s >> d;
	}

	return(d);
}
#endif

